<template>
    <view class="app-container setting">
        <zzk-nav title="设置"></zzk-nav>
        <view class="setting-box">
            <view class="setting-block">
                <view class="line flexrow" @tap="linkto('/pages/user/userinfo')">
                    <text class="label">修改我的信息</text>
                    <uni-icons type="right" size="20" color="#999"></uni-icons>
                </view>
                <view class="line flexrow" @tap="linkto('/pages/user/paytype')">
                    <text class="label">修改客户支付方式是</text>
                    <uni-icons type="right" size="20" color="#999"></uni-icons>
                </view>
                <view class="line flexrow">
                    <text class="label">版本</text>
                    <text class="value">version {{ version }}</text>
                </view>
            </view>
            <!-- <view class="setting-btn">
                <u-button text="退出登录" type="error" @click="loginOut"></u-button>
            </view> -->
        </view>
    </view>
</template>

<script setup>
import { version } from '@/utils/config.js'
import { useStore } from 'vuex'
import { linkto } from '@/utils/util'

const store = useStore()

const loginOut = () => {
    store.dispatch('user/loginOut')
}
</script>

<style lang="scss" scoped>
.setting {
    padding: 20rpx 0 0;
    &-block {
        background-color: #fff;
        padding: 0 0 0 $zzk-margin;
        .line {
            border-bottom: #eee 1rpx solid;
            padding-right: $zzk-margin;
            align-items: center;
            &:last-child {
                border-bottom: none;
            }
        }
        .label {
            line-height: 96rpx;
            font-size: 28rpx;
            flex: 1;
            color: $u-info;
        }
        .value {
            line-height: 96rpx;
            font-size: 28rpx;
        }
    }
    &-btn {
        padding: 40rpx $zzk-margin 0;
    }
}
</style>